package io.kiki.sba.registry.store.jdbc.domain;

import io.kiki.sba.registry.store.api.meta.DbEntry;
import io.kiki.sba.registry.store.jdbc.version.config.ConfigEntry;
import lombok.Getter;

import java.util.Date;


public class MultiClusterSyncDomain implements DbEntry, ConfigEntry {
    /**
     * primary key
     */
    private long id;

    /**
     * local data center
     */
    private String dataCenter;

    /**
     * sync remote data center
     */
    private String remoteDataCenter;

    /**
     * remote meta address, use to get meta leader
     */
    private String remoteMetaAddress;

    /**
     * true/false
     */
    private String enableSyncDatum;

    /**
     * true/false
     */
    @Getter
    private String enablePush;

    /**
     * sync dataInfoIds
     */
    private String syncDataInfoIds;

    /**
     * sync publish groups
     */
    private String synPublisherGroups;

    /**
     * ignore sync dataInfoIds
     */
    private String ignoreDataInfoIds;

    /**
     * data version
     */
    private long dataVersion;

    /**
     * create time
     */
    private Date gmtCreate;

    /**
     * last update time
     */
    private Date gmtModified;

    public MultiClusterSyncDomain() {
    }

    public MultiClusterSyncDomain(String dataCenter, String remoteDataCenter, String remoteMetaAddress, String enableSyncDatum, String enablePush, String syncDataInfoIds, String synPublisherGroups, String ignoreDataInfoIds, long dataVersion) {
        this.dataCenter = dataCenter;
        this.remoteDataCenter = remoteDataCenter;
        this.remoteMetaAddress = remoteMetaAddress;
        this.enableSyncDatum = enableSyncDatum;
        this.enablePush = enablePush;
        this.syncDataInfoIds = syncDataInfoIds;
        this.synPublisherGroups = synPublisherGroups;
        this.ignoreDataInfoIds = ignoreDataInfoIds;
        this.dataVersion = dataVersion;
    }

    @Override
    public long getId() {
        return id;
    }


    public void setId(long id) {
        this.id = id;
    }

    @Override
    public Date getGmtCreate() {
        return gmtCreate;
    }


    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }


    public String getDataCenter() {
        return dataCenter;
    }


    public void setDataCenter(String dataCenter) {
        this.dataCenter = dataCenter;
    }


    public String getRemoteDataCenter() {
        return remoteDataCenter;
    }


    public void setRemoteDataCenter(String remoteDataCenter) {
        this.remoteDataCenter = remoteDataCenter;
    }


    public String getRemoteMetaAddress() {
        return remoteMetaAddress;
    }


    public void setRemoteMetaAddress(String remoteMetaAddress) {
        this.remoteMetaAddress = remoteMetaAddress;
    }


    public String getEnableSyncDatum() {
        return enableSyncDatum;
    }


    public void setEnableSyncDatum(String enableSyncDatum) {
        this.enableSyncDatum = enableSyncDatum;
    }


    public void setEnablePush(String enablePush) {
        this.enablePush = enablePush;
    }


    public String getSyncDataInfoIds() {
        return syncDataInfoIds;
    }


    public void setSyncDataInfoIds(String syncDataInfoIds) {
        this.syncDataInfoIds = syncDataInfoIds;
    }


    public String getSynPublisherGroups() {
        return synPublisherGroups;
    }


    public void setSynPublisherGroups(String synPublisherGroups) {
        this.synPublisherGroups = synPublisherGroups;
    }


    public String getIgnoreDataInfoIds() {
        return ignoreDataInfoIds;
    }


    public void setIgnoreDataInfoIds(String ignoreDataInfoIds) {
        this.ignoreDataInfoIds = ignoreDataInfoIds;
    }


    public Date getGmtModified() {
        return gmtModified;
    }


    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }


    @Override
    public long getDataVersion() {
        return dataVersion;
    }


    public void setDataVersion(long dataVersion) {
        this.dataVersion = dataVersion;
    }
}
